using System;
using System.ComponentModel;
using Rhino.Security;
using WineCellar.Core.Converters;

namespace WineCellar.Business.Entities
{
    [TypeConverter(typeof(EntityConverter<User>))]
    public partial class User :IUser
    {
        public virtual int? Id { get; set; }
	
        public virtual string UserName { get; set; }
	        
        public virtual string Password { get; set; }

        public override string ToString()
        {
            return this.UserName;
        }

        public virtual SecurityInfo SecurityInfo
        {
            get { return new SecurityInfo(UserName, Id); }
        }
    }
}